package com.sikaryofficial.common.core.constant;

/**
 * @author : qinjinyuan
 * @desc : 业务缓存常量key
 * @date : 2023/10/28 16:19
 */
public class CacheBusinessConstants {
    /**
     * 音乐库分类
     */
    public static final String MUSIC_LIBRARY_GENRE_CACHE = "hismk:music:genre";
    /**
     * 音乐库分页缓存
     * {0} md5
     */
    public static final String MUSIC_LIBRARY_CACHE_PREFIX = "hismk:music:library";
    /**
     * 音乐库分页缓存
     * {0} md5
     */
    public static final String MUSIC_LIBRARY_CACHE = MUSIC_LIBRARY_CACHE_PREFIX + ":{0}";
    /**
     * 品牌口味基本信息缓存
     * <p>
     * {0} brandtasteID
     */
    public static final String BRAND_TASTE_HASH_LIST_CACHE = "hismk:brandtaste:hashList";
    /**
     * 产品MD5查询缓存
     */
    public static final String BRAND_HASH_MD5_CACHE = "hismk:brand:hash:MD5";

    /**
     * 产品短ID映射缓存
     */
    public static final String BRAND_SHORT_ID_MAPPER_CACHE = "hismk:brand:short:id:mapper";

    /**
     * 产品二维码生成lock
     * {0} 产品MD5
     */
    public static final String PRODUCT_QRCODE_LOCK_CACHE = "hismk:product:qrcode:lock:{0}";

    /**
     * 产品二维码生成临时缓存-前缀
     */
    public static final String PRODUCT_QRCODE_STATUS_PREFIX = "hismk:product:qrcode:status";

    /**
     * 产品二维码生成临时缓存
     * {0} 产品MD5
     */
    public static final String PRODUCT_QRCODE_STATUS_CACHE = PRODUCT_QRCODE_STATUS_PREFIX + ":{0}";

    public static final String PRODUCT_QRCODE_HUNDRED_PREFIX = "hismk:product:qrcode:hundred";
    /**
     * 商品二维码缓存  一百积分
     * {0} 产品ID
     */
    public static final String PRODUCT_QRCODE_HUNDRED_CACHE = PRODUCT_QRCODE_HUNDRED_PREFIX+ ":{0}";
    /**
     * 商品二维码上报数量缓存
     * {0} 产品16进制ID字符串
     */
    public static final String SCAN_QRCODE_NUM_CACHE = "hismk:scan:qrcode:{0}:count";
    /**
     * IP服务请求缓存
     * {0} IP地址
     */
    public static final String HISMK_IP_SERVICE_REQUEST_CACHE = "hismk:ip:service:request:{0}";

    /**
     * 查阅量排行统计缓存
     */
    public static final String ARTICLE_REVIEW_TOP10_CACHE = "hismk:article:review:top10";
    /**
     * 好友与粉丝 统计缓存
     * {0} userID
     * {2} 品牌
     */
    public static final String FOLLOW_FANS_CACHE = "hismk:follow:fans:{0}:{1}";
    /**
     * 好友与粉丝 统计缓存
     * {0} userID
     * {2} 品牌
     */
    public static final String FOLLOW_FRIEND_CACHE = "hismk:follow:friend:{0}:{1}";
    /**
     * 收到的点赞 统计缓存
     * {0} 品牌
     */
    public static final String RECEIVED_LIKES_CACHE = "hismk:received:likes:count:{0}";

    /**
     * 文章阅读量缓存
     * {0} 文章ID
     * {1} 用户ID
     * {2} 品牌
     */
    public static final String ARTICLE_VIEWS_CACHE = "hismk:article:views:{0}:{1}:{2}";

    /**
     * 产品评价阅读量缓存
     * {0} 评价ID
     * {1} 用户ID
     * {2} 品牌
     */
    public static final String PRODUCT_EVALUATE_VIEWS_CACHE = "hismk:product:evaluate:views:{0}:{1}:{2}";
    /**
     *
     * 文章分类缓存key
     *
     */
    public static final String ARTICLE_CATEGORY_LIST_KEY = "hismk:article:category:list";

    public static final String ARTICLE_PAGE_LIST_KEY_PREFIX = "hismk:article:page:list";
    /**
     * 文章分页列表缓存
     * {0} md5 = MD5(pageNum+pageSize + longitude + latitude)
     */
    public static final String ARTICLE_PAGE_LIST_KEY = ARTICLE_PAGE_LIST_KEY_PREFIX + ":{0}";

    public static final String INDUSTRYNEWS_PAGE_LIST_KEY_PREFIX = "hismk:industryNews:page:list";
    /**
     * 产业新闻分页列表缓存
     * {0} md5 = MD5(pageNum+pageSize + longitude + latitude)
     */
    public static final String INDUSTRYNEWS_PAGE_LIST_KEY = INDUSTRYNEWS_PAGE_LIST_KEY_PREFIX + ":{0}";

    /**
     * 法律法规列表ITEM
     */
    public static final String ARTICLE_STATUTE_PAGE_LIST_KEY_PREFIX = "hismk:article:statute:page:list";
    /**
     * 法律法规列表
     * {0} md5 = MD5(pageNum+pageSize + longitude + latitude)
     */
    public static final String ARTICLE_STATUTE_PAGE_LIST_KEY = ARTICLE_STATUTE_PAGE_LIST_KEY_PREFIX + ":{0}";

    /**
     * KOL列表ITEM
     */
    public static final String ARTICLE_KOL_PAGE_LIST_KEY_PREFIX = "hismk:article:kol:page:list";
    /**
     * KOL列表
     * {0} md5 = MD5(pageNum+pageSize + longitude + latitude)
     */
    public static final String ARTICLE_KOL_PAGE_LIST_KEY = ARTICLE_KOL_PAGE_LIST_KEY_PREFIX + ":{0}";

    /**
     * 个人发布最新记录
     * {0}  userIdStr
     */
    public static final String ARTICLE_OWNER_LATEST = "hismk:article:owner:latest:list";
    /**
     * 个人发布最新记录
     * {0}  userIdStr
     */
    public static final String ARTICLE_OWNER_LATEST_LIST_KEY_PREFIX = ARTICLE_OWNER_LATEST + ":{0}";
    /**
     * 个人发布最新记录
     * {1}  tenantIdStr
     */
    public static final String ARTICLE_OWNER_LATEST_LIST_KEY = ARTICLE_OWNER_LATEST_LIST_KEY_PREFIX + ":{1}";

    /**
     * 渠道商购物车缓存
     * {0} 用户id
     */
    public static final String CHANNEL_SHOPPING_CART_CACHE = "hismk:channel:shopping:cart:{0}";
    /**
     * 商品阶梯价格缓存
     * {0} 商品编码
     */
    public static final String PRICE_TIER_CACHE = "hismk:goods:price:tier";
}
